From: Victor Vasiliev Date: Thu, 20 Mar 2008 16:39:02 +0000 (+0000) Subject: Use Title::makeTitleSafe X-Git-Tag: 1.31.0-rc.0~48935 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=dfae566d0b2f1cf0f2f3707d80f9c26c9851f720;p=lhc%2Fweb%2Fwiklou.git Use Title::makeTitleSafe --- diff --git a/includes/Category.php b/includes/Category.php index b22f094232..37127d5484 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -206,6 +206,7 @@ class Category extends CategoryListBase { public function getSubcatCount() { return $this->getX( 'mSubcats' ); } /** @return mixed Number of member files, or false on failure */ public function getFileCount() { return $this->getX( 'mFiles' ); } + /** * This is not implemented in the base class, because arrays of Titles are * evil. @@ -216,8 +217,7 @@ class Category extends CategoryListBase { if( !$this->initialize() ) { return false; } - # FIXME is there a better way to do this? - return Title::newFromText( "Category:{$this->mNames[0]}" ); + return Title::makeTitleSafe( NS_CATEGORY, $this->mNames[0] ); } /** Generic accessor */